﻿ 
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
 

namespace Kaiser.EntityFramework.UnitOfWork
{
    public class CardExchangeUnitOfWork : BaseEFUnitOfWork
    {
        public CardExchangeUnitOfWork(string connectionString)
            : base("Name=" + connectionString)
        {
            Configuration.LazyLoadingEnabled = true;
        }

        #region DbContext Overrides
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            //Remove unused conventions
            modelBuilder.Conventions.Remove<OneToManyCascadeDeleteConvention>();
            //Add entity configurations in a structured way using 'TypeConfiguration’ classes
           

        }
        #endregion


    }
}
